<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-info-edit" th:object="${info}">
            <input id="id" name="id" th:field="*{id}"  type="hidden">
            <div class="form-group">	
                <label class="col-sm-3 control-label">宠物名字：</label>
                <div class="col-sm-8">
                    <input id="petName" name="petName" th:field="*{petName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">宠物详情：</label>
                <div class="col-sm-8">
                    <input id="petAsk" name="petAsk" th:field="*{petAsk}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">宠物种类：</label>
                <div class="col-sm-8">
                    <select name="statusId" class="form-control m-b" th:with="type=${@dicts.dictionary2()}"  th:field="*{statusId}">
                        <option value="">请选择</option>
                        <option th:each="dict : ${type}" th:text="${dict.typename}" th:value="${dict.dictionaryId}" ></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">宠物食品：</label>
                <div class="col-sm-8">
                    <select name="status" class="form-control m-b" th:with="type=${@dicts.food()}"  th:field="*{petFood}">
                        <option value="">请选择</option>
                        <option th:each="dict : ${type}" th:text="${dict.foodName}" th:value="${dict.foodId}" ></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">宠物首饰：</label>
                <div class="col-sm-8">
                    <select name="status" class="form-control m-b" th:with="type=${@dicts.accessories()}"  th:field="*{petJewelry}">
                        <option value="">请选择</option>
                        <option th:each="dict : ${type}" th:text="${dict.accessoriesName}" th:value="${dict.accessoriesId}" ></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">宠物健康状态：</label>
                <div class="col-sm-8">
                    <select name="status" class="form-control m-b" th:with="type=${@dicts.dictionary()}"  th:field="*{petHealth}">
                        <option value="">请选择</option>
                        <option th:each="dict : ${type}" th:text="${dict.typename}" th:value="${dict.dictionaryId}" ></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">宠物销售状态：</label>
                <div class="col-sm-8">
                    <select name="status" class="form-control m-b" th:with="type=${@dicts.dictionary1()}"  th:field="*{petSellstatus}">
                        <option value="">请选择</option>
                        <option th:each="dict : ${type}" th:text="${dict.typename}" th:value="${dict.dictionaryId}" ></option>
                    </select>
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">宠物进货价格：</label>
                <div class="col-sm-8">
                    <input id="petStock" name="petStock" th:field="*{petStock}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">宠物出售价格：</label>
                <div class="col-sm-8">
                    <input id="petSell" name="petSell" th:field="*{petSell}" class="form-control" type="text">
                </div>
            </div>
			<div class="form-group">
				<div class="form-control-static col-sm-offset-9">
					<button type="submit" class="btn btn-primary">提交</button>
					<button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
				</div>
			</div>
		</form>
    </div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "module/info"
		$("#form-info-edit").validate({
			rules:{
				xxxx:{
					required:true,
				},
			},
			submitHandler: function(form) {
				$.operate.save(prefix + "/edit", $('#form-info-edit').serialize());
			}
		});
	</script>
</body>
</html>
